b89dc9ebf3f2c941a9478fd9c348713612722e46,cepheus-ngsi/src/main/java/com/orange/ngsi/server/NgsiValidation.java,NgsiValidation,checkUpdateContextSubscription,#UpdateContextSubscription#,78
Before Change
}
public void checkUpdateContextSubscription(UpdateContextSubscription updateContextSubscription) throws MissingRequestParameterException {
if ((updateContextSubscription.getSubscriptionId() == null) || (updateContextSubscription.getSubscriptionId().isEmpty())){
throw new MissingRequestParameterException("subscriptionId", "String");
}
if (updateContextSubscription.getRestriction() != null) {
if ((updateContextSubscription.getRestriction().getAttributeExpression() == null) || (updateContextSubscription.getRestriction().getAttributeExpression().isEmpty())) {
throw new MissingRequestParameterException("attributeExpression", "string");
}
}
After Change
}
public void checkUpdateContextSubscription(UpdateContextSubscription updateContextSubscription) throws MissingRequestParameterException {
if (nullOrEmpty(updateContextSubscription.getSubscriptionId())){
throw new MissingRequestParameterException("subscriptionId", "String");
}
if (updateContextSubscription.getRestriction() != null) {
if (nullOrEmpty(updateContextSubscription.getRestriction().getAttributeExpression())
&& nullOrEmpty(updateContextSubscription.getRestriction().getScopes())) {
throw new MissingRequestParameterException("attributeExpression or scopes", "string");
}
}